package com.ansuenjob.jsonBuilder;

import org.json.JSONException;
import org.json.JSONObject;

import com.ansuenjob.model.Company;
import com.ansuenjob.model.PersonViewList;
import com.ansuenjob.vo.JobResumeLookVO;
import com.ansuenjob.vo.JobVO;


public class ResumeLookVOBuilder extends JSONBuilde<JobResumeLookVO> {

	@Override
	public JobResumeLookVO buildJson(JSONObject jsonObject) throws JSONException {
		//
		ResumeLookCompanyBuilder comBuilder = new ResumeLookCompanyBuilder();
		ResumeLookViewlistBuilder viewListBuilder = new ResumeLookViewlistBuilder();				
		//
		JSONObject jCompany = jsonObject.getJSONObject("bstCompanyAccount");
		JSONObject jViewlist = jsonObject.getJSONObject("bstPersonViewList");
		//
		Company company = comBuilder.buildJson(jCompany);
		PersonViewList personViewList = viewListBuilder.buildJson(jViewlist);
		//
		JobResumeLookVO jobResumeLookVO = new JobResumeLookVO(company,personViewList); 
		return jobResumeLookVO;
	}

}
